/**
PDTC
Copyright 2011 Patrick Devaney

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

#include <iostream>
#include <string.h>
using namespace std;
#include "converters.cpp"

int main(void) {
// The copyright notice
cout << "PDTC: Patrick Devaney's Temperature Converter" << endl
<< "Copyright (c) 2011 Patrick Devaney" << endl
<< "Released under the Apache License Version 2" << endl << endl;
// A bit of a sloppy solution, but it keeps the program
// from crashing when invalid data is entered.
int i = 0;
string choice;
while(i < 1) {
cout << "Would you like to:" << endl << "1 - Convert Celsius to Kelvin" << endl
<< "2 - Convert Fahrenheit to Kelvin" << endl << "3 - Convert Kelvin to Celsius" << endl
<< "4 - Convert Kelvin to Fahrenheit" << endl << "5 - Convert Fahrenheit to Celsius" << endl
<< "6 - Convert Celsius to Fahrenheit" << endl;
cin >> choice;
// Celsius to Kelvin
if(choice == "1") {
ctok();
i++;
}
// Fahrenheit to Kelvin
else if(choice == "2") {
ftok();
i++;
}
// Kelvin to Celsius
else if(choice == "3") {
ktoc();
i++;
}
// Kelvin to Fahrenheit
else if(choice == "4") {
ktof();
i++;
}
// Fahrenheit to Celsius
else if(choice == "5") {
ftoc();
i++;
}
// Celsius to Fahrenheit
else if(choice == "6") {
ctof();
i++;
}

// End while
}
// End int main
}